<script setup lang="ts">
    import type {WarehousePosition} from './type'
















    const baseApi = '/wcs/warehouse-position'

    

    const {loadData, loading, model} = useDetail<WarehousePosition>(baseApi)

    defineExpose({ init: loadData })
</script>

<template>
    <el-empty v-if="!Object.keys(model).length" v-loading="loading" />
    <el-descriptions v-else v-loading="loading" :column="2" border >
            <el-descriptions-item label="仓库编码" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.warehouseCode }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="层" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.stratum }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="排" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.order }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="列" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.design }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="物料编码" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.mrlCode }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="物料类型" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.mrlType }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="数量" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.qty }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="单位" label-class-name="item-label" label-align="right">
                        <el-tag v-if="model.unitLabel" :color="model.unitLabel.ext?.color" effect="dark" type="info">
                            {{ model.unitLabel?.label }}
                        </el-tag>
            </el-descriptions-item>
            <el-descriptions-item label="区域" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.area }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="创建人" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.createByLabel }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="创建时间" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.createTime }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="更新人" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.updateByLabel }}
                    </span>
            </el-descriptions-item>
            <el-descriptions-item label="更新时间" label-class-name="item-label" label-align="right">
                    <span class="txt-short">
                        {{ model.updateTime }}
                    </span>
            </el-descriptions-item>
    </el-descriptions>
</template>

<style scoped lang="scss">
    .el-descriptions {
        :deep(.el-descriptions__header) {
            margin: 0 10px 12px;
        }

            :deep(.item-label) {
                width: 120px;
            }
    }
</style>